[ToC] [Up] [Back] [Next] ... [Book Plug] The Information Commons
.................... Introduction to HTML

6.2 Stylesheets

Stylesheets are not formally part of HTML 3, but as they were/are being developed at the same time, this seemed a good place to mention them.

HTML does not contain much formatting information. At the same time, authors want the ability to specify how they want their data displayed. The idea behind stylesheets is that this display formatting information can be stored as a separate piece of information, called a stylesheet, and that the stylesheet can then be applied to a document while it is being formatted for display.

For example, a stylesheet could contain command such as:

Format H3 headings in red 18pt Times-Roman.
Format Paragraphs in 12pt times roman, with a left and right margin of 0.5".
and so on. The CLASS attribute could be further used to subdivide formatting instructions. Thus <P CLASS="abstract"> could be given characteristics different from <P CLASS="body">.

6.2.1 Specifying Stylesheets

Stylesheet would be specified in a document using a STYLE element in the HEAD. For example,
  <HEAD>
  <STYLE HREF="../styles/style_form.css">
  ...
  </HEAD>
would give the URL of the stylesheet to be loaded and used. Here the extension CSS refers to Cascading Stylesheets, one of the methods under development. The other propsed technique is called DSSSL-Lite. You don't really want to know what all the letters mean!

For additional information about stylesheets, please see the bibliography.


[ToC] [Up] [Back] [Next] ... [Book Plug] .................... Introduction to HTML

© Ian Graham 1994-1995 Page Last Updated: 4 December 1995